

<div class="heading-buttons">
	<h3 class="glyphicons facetime_video">
		<i></i> Video Gallery
	</h3>


	<div class="pull-right">

		<?php if($admin['videos']){?>
		<form name="action" method="POST"
				action="<?=base_url(); ?>secure/videos/videos_management">
			<select name="order" onchange="this.form.submit()">
				<option value="">-- Select --</option>
				<option value="inactive">Inactive</option>
				<option value="active">Active</option>


			</select>
		</form>
	</div>
</div>

<div class="separator"></div>
<div class="widget widget-2 widget-body-white finances_summary">
	<div class="widget-head">
		<h4 class="heading glyphicons no-js facetime_video"><i></i> Video List</h4>
	</div>
	
		<div class="widget-body">
	<div class="row-fluid">
	<?php if($admin['videos']){?>
	
			<?php foreach ($admin['videos'] as $videos): ?>
		<div class="span4">
			<div class="widget widget-4">
				
				<div class="widget-body list products">
				
					<ul>
						<li>
						
							<span><a id="mediaVideo" href="#" data-toggle="modal"
					data-target="<?='#'.$videos->id; ?>"> <img
					src="<?= base_url() ?>assets/images/video.png"
					alt="video " <?= $this->admin_listing_model->get_business_name($videos->listing_id)->title;?> />
				
				
				</a>
				
				
				</span>
							<span class="title"><strong>
							<?php if($this->admin_listing_model->get_business_name($videos->listing_id)){?>
							<?= $this->admin_listing_model->get_business_name($videos->listing_id)->title;?>
							<?php }?>
							</strong><br/>
								<?php if ($videos->status == 1) { ?>
					<a class="btn btn-mini btn-info"
						href="<?= base_url(); ?>secure/videos/videos_management/change_videos_status/<?= $videos->status;?>/<?= $videos->id; ?>"
						title="Inactive" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"><i class="icon-thumbs-down icon-white"><i></i></i></a>
					<?php } else { ?>
					<a class="btn btn-mini btn-info"
						href="<?= base_url(); ?>secure/videos/videos_management/change_videos_status/<?= $videos->status;?>/<?= $videos->id; ?>"
						title="Active" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"><i class="icon-thumbs-up icon-white"><i></i></i> </a>
					<?php } ?>
<a class="btn btn-mini btn-danger"
						href="<?= base_url(); ?>secure/videos/videos_management/delete_video/<?= $videos->id; ?>" <?php if($this->config->item('mode')=='DEMO'){?>onclick="alert ('Sorry! Demo mode '); return false;" <?} else?>onclick="return confirm('Are you sure ?');"
						 ><i class="icon-trash icon-white"><i></i></i></a>
							</span>
							
						</li>
					</ul>
				
		<!-- Modal -->
				<div id="<?=$videos->id; ?>" class="modal hide fade"
					style="width: auto;" tabindex="-1" role="dialog">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">X</button>
						<h3 id="myModalLabel">Listing Video</h3>
					</div>

					<div class="modal-body">
						<?= $videos->video_url; ?>
					</div>
				
				</div>
					
				</div>
			</div>
		</div>
			<?php endforeach; 
}?>
			<?php }else { echo "No Data found....";
}?>
		
		
		
	</div>
	<div class="pagination pull-right">
		<ul>
			<li><?php  echo $this->pagination->create_links(); ?>
			</li>
		</ul>
		</div>
</div>
	
	
	
	
		</div>
		
		
		
